<?php

$sqlLan = "SELECT lan_abbr,lan_name FROM ".$PROJECT_DB_TABLES["language"]."";

$resultLan = getRecord($sqlLan);

$unavailableLan = getLangs();

addContent('<p><select>');

foreach($resultLan as $value){
	
	if(!findInLangArr($value["lan_abbr"])){
		
		addContent("<option value=\"".$value["lan_abbr"]."\">".$value["lan_name"]." ".$value["lan_abbr"]."</option>");
	}
}

addContent('</select>');

addContent("<input type=\"button\" value=\"Create New Language\" onclick=\"onclick_createNewLan(this)\"/></p>");



function findInLangArr($currentLan){
	
	global $unavailableLan;
	
	foreach($unavailableLan as $value){
		
		if($currentLan == $value[0]){
			
			return true;
		}
	}
	
	return false;
}

?>